def login (func):
    def inter(arg):
        print 'xxx'
        func(arg)
    return inter

@login
def apple(name):
    print '%s is ccie' % name

apple('chris')